package com.jsu.springboot_medicine;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration;
import org.springframework.context.annotation.Bean;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
import org.springframework.security.crypto.password.PasswordEncoder;
import springfox.documentation.swagger2.annotations.EnableSwagger2;

import javax.annotation.Resource;


@SpringBootApplication
@MapperScan("com.jsu.springboot_medicine.dao")
@EnableSwagger2
public class SpringbootMedicineApplication {

    public static void main(String[] args) {
        SpringApplication.run(SpringbootMedicineApplication.class, args);
        System.out.println("成功");
    }

    @Bean
    public PasswordEncoder passwordEncoder(){
        return new BCryptPasswordEncoder();
    }
}
